<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html lang="en" class="no-js" id="ng-app">
<head>
<meta charset="UTF-8">
<jsp:include page="/includes/common/head.jsp" />
<title>CS4280 BOOKSTORE</title>
</head>
<body>
	<div data-flex-background-src="${ baseURL }/assets/img/background.jpg"
		flex-background></div>
	<jsp:include page="/includes/header.jsp">
		<jsp:param name="currentUser" value="${currentUser}" /><jsp:param name="baseURL" value="${ baseURL }" />
	</jsp:include>
	<section id="mainContent">
		<jsp:include page="/includes/admin/sidebar.jsp" />

		<section class="content">
			<table class="shush-table">
				<thead>
					<tr>
						<td>ID</td>
						<td>Title</td>
						<td>Description</td>
						<td>Price</td>
						<td>Quantity</td>
						<td>Publisher</td>
						<td>Language</td>
						<td>No of View</td>
						<td>No of Purchase</td>
						<td></td>
					</tr>
				</thead>
				<c:forEach var="book" items="${books}">
					<tr>
						<td>${ book.id }</td>
						<td><a href="${ baseURL }/admin/manage/book?action=show&id=${ book.id }">${ book.title }</a></td>
						<td>${ book.description }</td>
						<td>${ book.price }</td>
						<td>${ book.quantity }</td>
						<td>${ book.publisher }</td>
						<td>${ book.language }</td>
						<td>${ book.noOfView }</td>
						<td>${ book.noOfPurchase }</td>
						<td>
							<a href="${ baseURL }/admin/manage/book?action=edit&id=${ book.id }">Edit</a>
							<br />
							<a href="${ baseURL }/admin/manage/book?action=delete&id=${ book.id }">Delete</a>
						</td>
					</tr>
				</c:forEach>
			</table>
		</section>
	</section>
</body>
</html>
